package com.feihong.txgw.inter.listener.web;

import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.webkit.JavascriptInterface;

import com.feihong.txgw.ui.activity.setting.MessageContentActivity;
import com.just.agentweb.AgentWeb;

/**
 * Created by PVer on 2017/8/3.
 * MessageContentActivity   所需要的
 */

public class SystemMessagecontent {

    private AgentWeb agent;
    private MessageContentActivity context;
    private MessageContentActivity.ActionCallBack callBack;

    private Handler deliver = new Handler(Looper.getMainLooper());

    public SystemMessagecontent(AgentWeb agent, Context context, MessageContentActivity.ActionCallBack callback) {
        this.agent = agent;
        this.context = (MessageContentActivity) context;
        this.callBack = callback;
    }

    /*         进来就请求的        */
    @JavascriptInterface
    public String get_result(final String msg) {
        return callBack.get_result(msg);
    }


    /*         点击每一项的交互         */
    @JavascriptInterface
    public String goDetail(final String info) {

        return callBack.go_Detail(info);
    }
}
